From: Göran Uddeborg Date: Mon, 30 Nov 2015 17:11:57 +0000 (+0100) Subject: Declare the xstrdup(const char*) variant of xstrdup. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~10^2~5^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=beb73ea86225bfeeddbb2ab2783ade1a8ba33225;p=gpsbabel.git Declare the xstrdup(const char*) variant of xstrdup. Previously, only the xstrdup(const Qstring&) version was known, which led to incorrect encoding conversions. https://sourceforge.net/p/gpsbabel/mailman/gpsbabel-misc/thread/22100.54710.435238.946764%40mimmi.uddeborg/#msg34645421 --- diff --git a/defs.h b/defs.h index 9a8cf0391..7c9a39f88 100644 --- a/defs.h +++ b/defs.h @@ -902,6 +902,7 @@ char* xstrappend(char* src, const char* addon); #define xxrealloc(p, s, file, line) xrealloc(p,s) #define xxfree(mem, file, line) xfree(mem) #define xxstrdup(s, file, line) xstrdup(s) +char *xstrdup(const char* s); #define xxstrappend(src, addon, file, line) xstrappend(src, addon) #else /* DEBUG_MEM */ void* XCALLOC(size_t nmemb, size_t size, DEBUG_PARAMS);